<?php

namespace app\admin\validate\Coupon;

use think\Validate;

class ProductChannel extends Validate
{
    protected $rule = [
        'id'          => 'require',
        'shelf_state' => 'require|in:1,0',
        //'cate_id' => 'require',
        'brand_id'    => 'require',
        'type_id'     => 'require',
        'product_id'  => 'require',
    ];

    protected $message = [
        'id.require'          => 'id必填',
        'shelf_state.require' => '上下架状态值不能为空',
        //'cate_id.require' => '分类不能为空',
        'brand_id.require'    => ' 品牌类型不能为空',
        'type_id.require'     => '充值类型不能为空',
        'product_id.require'  => '充值面额不能为空',
    ];

    protected $scene = [
        //'edit' => ['id',"cate_id",'brand_id','type_id', 'product_id'],
        'edit'  =>  ['id','brand_id','type_id', 'product_id'],
        'shelf' =>  ['id', 'shelf_state'],
        'match' =>  ['id', 'shelf_state']
    ];
}
